/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Pay;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author deltawi
 */
@WebService()
public class Payement {

    /**
     * Web service operation
     */
    @WebMethod(operationName = "operation")
    public String operation(@WebParam(name = "code")
    String code, @WebParam(name = "prix")
    double prix) {
        //TODO write your implementation code here:

        return tester(code);

    }

    public String tester(String code){

        if(code.equals("1111"))
            return "Ok, Opération Réussie !!";
        else if (code.equals("1101"))
            return "Ok, Opération Réussie !!";
        else if (code.equals("1010"))
            return "Ok, Opération Réussie !!";
        else return "Non OK, Opération Echec !!";
    }

}
